
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>

<sjg:grid
    id="dccrGrid"
    caption="Generated D.C.C.R. for Cashmate %{#session.dccrbranchname} On %{#session.dccrgendate.dayofweek}, %{#session.dccrdate}"
    dataType="json"
    href="%{remoteurl}"
    cellEdit="true"
    cellurl="%{editurl}"
    gridModel="gridModel"
    pagerButtons="true"
    pagerInput="true"
    rowList="15,30,60"
    rowNum="15"
    loadingText="Requesting Data..."
    width="970"
    shrinkToFit="false"
    pager="true"
    hoverrows="true"
    rownumbers="true"
    autoencode="true"
    viewrecords="true"
    navigator="true"
    navigatorAdd="false"
    navigatorDelete="false"
    navigatorEdit="false"
    navigatorSearch="true"
    navigatorView="true"
    onGridCompleteTopics="dccrGridComplete"
    onCellEditSuccessTopics="celleditsuccess"
    >
    <sjg:gridColumn name="dccrid"
                    index="dccrid"
                    title="dccrid"
                    key="true"
                    hidden="true"
                    />

    <sjg:gridColumn name="borrowercode"
                    index="borrowercode"
                    title="Borrower"
                    sortable="true"
                    search="true"
                    searchoptions="{sopt:['eq']}"
                    align="center"
                    />

    <sjg:gridColumn name="borrowername"
                    index="borrowername"
                    title="Name"
                    sortable="true"
                    search="true"
                    searchoptions="{sopt:['eq']}"
                    align="center"
                    />

    <sjg:gridColumn name="areacode"
                    index="areacode"
                    title="Area Code"
                    sortable="true"
                    search="true"
                    searchoptions="{sopt:['eq']}"
                    align="center"
                    />

    <sjg:gridColumn name="debitedpayment"
                    index="debitedpayment"
                    title="Debit"
                    sortable="true"
                    search="false"
                    editable="true"
                    edittype="text"
                    formatter="currency"
                    editoptions="{maxlength:'45'}"
                    editrules="{number:true}"
                    align="center"
                    />

    <sjg:gridColumn name="p1"
                    index="p1"
                    formatter="currency"
                    search="false"
                    title="%{#session.dccrgendate.paymentday1}"
                    sortable="true"
                    align="center"
                    />

    <sjg:gridColumn name="p2"
                    index="p2"
                    formatter="currency"
                    title="%{#session.dccrgendate.paymentday2}"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="p3"
                    index="p3"
                    formatter="currency"
                    title="%{#session.dccrgendate.paymentday3}"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="p4"
                    index="p4"
                    formatter="currency"
                    title="%{#session.dccrgendate.paymentday4}"
                    sortable="true"
                    search="false"
                    align="center"
                    />
    <s:if test="%{#session.dccrgendate.cutoffSize >= 5}">
        <sjg:gridColumn name="p5"
                        index="p5"
                        formatter="currency"
                        title="%{#session.dccrgendate.paymentday5}"
                        sortable="true"
                        search="false"
                        align="center"
                        />
    </s:if>
    <s:if test="%{#session.dccrgendate.cutoffSize >= 6}">
        <sjg:gridColumn name="p6"
                        index="p6"
                        formatter="currency"
                        title="%{#session.dccrgendate.paymentday6}"
                        sortable="true"
                        search="false"
                        align="center"
                        />
    </s:if>
    <s:if test="%{#session.dccrgendate.cutoffSize >= 7}">
        <sjg:gridColumn name="p7"
                        index="p7"
                        formatter="currency"
                        title="%{#session.dccrgendate.paymentday7}"
                        sortable="true"
                        search="false"
                        align="center"
                        />
    </s:if>

    <sjg:gridColumn name="productname"
                    index="productname"
                    title="Product"
                    sortable="true"
                    search="false"
                    searchoptions="{sopt:['eq']}"
                    align="center"
                    />

    <sjg:gridColumn name="numloan"
                    index="numloan"
                    title="Loan No."
                    sortable="true"
                    search="false"
                    searchoptions="{sopt:['eq']}"
                    align="center"
                    />

    <sjg:gridColumn name="releasedate"
                    index="releasedate"
                    title="Release Date"
                    sortable="true"
                    search="false"
                    searchoptions="{sopt:['eq']}"
                    align="center"
                    />

    <sjg:gridColumn name="maturitydate"
                    index="maturitydate"
                    title="Maturity Date"
                    search="false"
                    sortable="true"
                    align="center"
                    />

    <sjg:gridColumn name="daysleft"
                    index="daysleft"
                    title="Days Left"
                    search="false"
                    sortable="true"
                    align="center"
                    />

    <sjg:gridColumn name="dailyamort"
                    index="dailyamort"
                    formatter="currency"
                    search="false"
                    title="Daily Amort"
                    sortable="true"
                    align="center"
                    />

    <sjg:gridColumn name="totalcutoffpayment"
                    index="totalcutoffpayment"
                    formatter="currency"
                    title="Total CutOff Payment"
                    sortable="false"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="totalcutoffcollection"
                    index="totalcutoffcollection"
                    formatter="currency"
                    title="Total CutOff Collection"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="cutoffdue"
                    index="cutoffdue"
                    title="Cut-Off Due"
                    formatter="currency"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="todaysdue"
                    index="todaysdue"
                    title="Today's Due"
                    sortable="true"
                    formatter="currency"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="overdue"
                    index="overdue"
                    title="Overdue"
                    formatter="currency"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="totaladvance"
                    index="totaladvance"
                    title="Total Advance"
                    formatter="currency"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="dueplusod"
                    index="dueplusod"
                    title="Due + OD"
                    formatter="currency"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="totalpayment"
                    index="totalpayment"
                    title="Total Payment"
                    formatter="currency"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="balance"
                    index="balance"
                    title="Balance"
                    formatter="currency"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="promisorynote"
                    index="promisorynote"
                    title="Promisory Note"
                    formatter="currency"
                    sortable="true"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="currentpn"
                    index="currentpn"
                    title="Current PN"
                    sortable="true"
                    formatter="currency"
                    search="false"
                    align="center"
                    />

    <sjg:gridColumn name="lastcutoff"
                    index="lastcutoff"
                    title="Last Cut-Off"
                    formatter="currency"
                    sortable="true"
                    search="false"
                    align="center"
                    />
</sjg:grid>